<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .left {
            width: 1000px;
            height: 848px;
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
            float: left;
        }

        .left .chair {
            width: 230px;
            height: 430px;
            box-sizing: border-box;
            border: 1px solid #000;
        }

        .left .chair .image img {
            width: 100%;
        }

        .left .chair .wenzi p {
            font-weight: 500;
            font-size: 20px;
            margin-left: 30px;
        }

        .wenzi button {
            width: 130px;
            height: 40px;
            background-color: red;
            color: white;
            text-align: center;
            line-height: 38px;
            border-radius: 10px;
            margin-top: 10px;
            margin-left: 30px;
        }

        .box .right p {
            font-size: 30px;
        }
    </style>
</head>

<body>
    <div class="box">
        <ul class="left">
        </ul>
        <div class="right">
            <p>购物车</p>
        </div>
    </div>
</body>

</html>
<script>
    let arr = [
        { id: 0, img: './img/0.png', name: '高级办公椅', pice: 10000 },
        { id: 1, img: './img/1.png', name: '高级按摩椅', pice: 1000 },
        { id: 2, img: './img/2.png', name: '高级自动按摩椅', pice: 1000 },
        { id: 3, img: './img/3.png', name: '电动按摩椅', pice: 1000 },
        { id: 4, img: './img/4.png', name: '办公桌', pice: 10 },
        { id: 5, img: './img/5.png', name: '可升降办公椅', pice: 100 },
        { id: 6, img: './img/6.png', name: '可升降办公桌', pice: 300 },
        { id: 7, img: './img/7.png', name: '老板椅', pice: 5000 },
    ]
    document.querySelector('.left').innerHTML = arr.map((item) => {
        return `
        <li >
                <div class="image"><img src="${item.img}" alt=""></div>
                <div class="wenzi">
                    <p>${item.name}</p>
                    <p>${item.pice}</p>
                    <button>加入购物车</button>
                </div>
            </li>
        `
    }).join('') 
</script>